package cn.org.hentai.simulator.web.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ScheduleTaskExample {
    /**
     */
    protected String orderByClause;

    /**
     */
    protected boolean distinct;

    /**
     */
    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    /**
     */
    public ScheduleTaskExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    /**
     */
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    /**
     */
    public String getOrderByClause() {
        return orderByClause;
    }

    /**
     */
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    /**
     */
    public boolean isDistinct() {
        return distinct;
    }

    /**
     */
    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    /**
     */
    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    /**
     */
    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    /**
     */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    /**
     */
    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria(this);
        return criteria;
    }

    /**
     */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    public void setPageInfo(Integer currentPage, Integer pageSize) {
        if(pageSize<1) throw new IllegalArgumentException("页大小不能小于1！");
        this.limit=pageSize;
        if(currentPage<1) throw new IllegalArgumentException("页数不能小于1！");
        this.offset=(currentPage-1)*pageSize;
    }

    /**
     */
    public ScheduleTaskExample orderBy(String orderByClause) {
        this.setOrderByClause(orderByClause);
        return this;
    }

    /**
     */
    public ScheduleTaskExample orderBy(String ... orderByClauses) {
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < orderByClauses.length; i++) {
            sb.append(orderByClauses[i]);
            if (i < orderByClauses.length - 1) {
                sb.append(" , ");
            }
        }
        this.setOrderByClause(sb.toString());
        return this;
    }

    /**
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andRouteIdIsNull() {
            addCriterion("routeId is null");
            return (Criteria) this;
        }

        public Criteria andRouteIdIsNotNull() {
            addCriterion("routeId is not null");
            return (Criteria) this;
        }

        public Criteria andRouteIdEqualTo(Long value) {
            addCriterion("routeId =", value, "routeId");
            return (Criteria) this;
        }

        public Criteria andRouteIdNotEqualTo(Long value) {
            addCriterion("routeId <>", value, "routeId");
            return (Criteria) this;
        }

        public Criteria andRouteIdGreaterThan(Long value) {
            addCriterion("routeId >", value, "routeId");
            return (Criteria) this;
        }

        public Criteria andRouteIdGreaterThanOrEqualTo(Long value) {
            addCriterion("routeId >=", value, "routeId");
            return (Criteria) this;
        }

        public Criteria andRouteIdLessThan(Long value) {
            addCriterion("routeId <", value, "routeId");
            return (Criteria) this;
        }

        public Criteria andRouteIdLessThanOrEqualTo(Long value) {
            addCriterion("routeId <=", value, "routeId");
            return (Criteria) this;
        }

        public Criteria andRouteIdIn(List<Long> values) {
            addCriterion("routeId in", values, "routeId");
            return (Criteria) this;
        }

        public Criteria andRouteIdNotIn(List<Long> values) {
            addCriterion("routeId not in", values, "routeId");
            return (Criteria) this;
        }

        public Criteria andRouteIdBetween(Long value1, Long value2) {
            addCriterion("routeId between", value1, value2, "routeId");
            return (Criteria) this;
        }

        public Criteria andRouteIdNotBetween(Long value1, Long value2) {
            addCriterion("routeId not between", value1, value2, "routeId");
            return (Criteria) this;
        }

        public Criteria andDriverIdIsNull() {
            addCriterion("driverId is null");
            return (Criteria) this;
        }

        public Criteria andDriverIdIsNotNull() {
            addCriterion("driverId is not null");
            return (Criteria) this;
        }

        public Criteria andDriverIdEqualTo(Long value) {
            addCriterion("driverId =", value, "driverId");
            return (Criteria) this;
        }

        public Criteria andDriverIdNotEqualTo(Long value) {
            addCriterion("driverId <>", value, "driverId");
            return (Criteria) this;
        }

        public Criteria andDriverIdGreaterThan(Long value) {
            addCriterion("driverId >", value, "driverId");
            return (Criteria) this;
        }

        public Criteria andDriverIdGreaterThanOrEqualTo(Long value) {
            addCriterion("driverId >=", value, "driverId");
            return (Criteria) this;
        }

        public Criteria andDriverIdLessThan(Long value) {
            addCriterion("driverId <", value, "driverId");
            return (Criteria) this;
        }

        public Criteria andDriverIdLessThanOrEqualTo(Long value) {
            addCriterion("driverId <=", value, "driverId");
            return (Criteria) this;
        }

        public Criteria andDriverIdIn(List<Long> values) {
            addCriterion("driverId in", values, "driverId");
            return (Criteria) this;
        }

        public Criteria andDriverIdNotIn(List<Long> values) {
            addCriterion("driverId not in", values, "driverId");
            return (Criteria) this;
        }

        public Criteria andDriverIdBetween(Long value1, Long value2) {
            addCriterion("driverId between", value1, value2, "driverId");
            return (Criteria) this;
        }

        public Criteria andDriverIdNotBetween(Long value1, Long value2) {
            addCriterion("driverId not between", value1, value2, "driverId");
            return (Criteria) this;
        }

        public Criteria andVehicleIdIsNull() {
            addCriterion("vehicleId is null");
            return (Criteria) this;
        }

        public Criteria andVehicleIdIsNotNull() {
            addCriterion("vehicleId is not null");
            return (Criteria) this;
        }

        public Criteria andVehicleIdEqualTo(Long value) {
            addCriterion("vehicleId =", value, "vehicleId");
            return (Criteria) this;
        }

        public Criteria andVehicleIdNotEqualTo(Long value) {
            addCriterion("vehicleId <>", value, "vehicleId");
            return (Criteria) this;
        }

        public Criteria andVehicleIdGreaterThan(Long value) {
            addCriterion("vehicleId >", value, "vehicleId");
            return (Criteria) this;
        }

        public Criteria andVehicleIdGreaterThanOrEqualTo(Long value) {
            addCriterion("vehicleId >=", value, "vehicleId");
            return (Criteria) this;
        }

        public Criteria andVehicleIdLessThan(Long value) {
            addCriterion("vehicleId <", value, "vehicleId");
            return (Criteria) this;
        }

        public Criteria andVehicleIdLessThanOrEqualTo(Long value) {
            addCriterion("vehicleId <=", value, "vehicleId");
            return (Criteria) this;
        }

        public Criteria andVehicleIdIn(List<Long> values) {
            addCriterion("vehicleId in", values, "vehicleId");
            return (Criteria) this;
        }

        public Criteria andVehicleIdNotIn(List<Long> values) {
            addCriterion("vehicleId not in", values, "vehicleId");
            return (Criteria) this;
        }

        public Criteria andVehicleIdBetween(Long value1, Long value2) {
            addCriterion("vehicleId between", value1, value2, "vehicleId");
            return (Criteria) this;
        }

        public Criteria andVehicleIdNotBetween(Long value1, Long value2) {
            addCriterion("vehicleId not between", value1, value2, "vehicleId");
            return (Criteria) this;
        }

        public Criteria andFromTimeIsNull() {
            addCriterion("fromTime is null");
            return (Criteria) this;
        }

        public Criteria andFromTimeIsNotNull() {
            addCriterion("fromTime is not null");
            return (Criteria) this;
        }

        public Criteria andFromTimeEqualTo(String value) {
            addCriterion("fromTime =", value, "fromTime");
            return (Criteria) this;
        }

        public Criteria andFromTimeNotEqualTo(String value) {
            addCriterion("fromTime <>", value, "fromTime");
            return (Criteria) this;
        }

        public Criteria andFromTimeGreaterThan(String value) {
            addCriterion("fromTime >", value, "fromTime");
            return (Criteria) this;
        }

        public Criteria andFromTimeGreaterThanOrEqualTo(String value) {
            addCriterion("fromTime >=", value, "fromTime");
            return (Criteria) this;
        }

        public Criteria andFromTimeLessThan(String value) {
            addCriterion("fromTime <", value, "fromTime");
            return (Criteria) this;
        }

        public Criteria andFromTimeLessThanOrEqualTo(String value) {
            addCriterion("fromTime <=", value, "fromTime");
            return (Criteria) this;
        }

        public Criteria andFromTimeLike(String value) {
            addCriterion("fromTime like", value, "fromTime");
            return (Criteria) this;
        }

        public Criteria andFromTimeNotLike(String value) {
            addCriterion("fromTime not like", value, "fromTime");
            return (Criteria) this;
        }

        public Criteria andFromTimeIn(List<String> values) {
            addCriterion("fromTime in", values, "fromTime");
            return (Criteria) this;
        }

        public Criteria andFromTimeNotIn(List<String> values) {
            addCriterion("fromTime not in", values, "fromTime");
            return (Criteria) this;
        }

        public Criteria andFromTimeBetween(String value1, String value2) {
            addCriterion("fromTime between", value1, value2, "fromTime");
            return (Criteria) this;
        }

        public Criteria andFromTimeNotBetween(String value1, String value2) {
            addCriterion("fromTime not between", value1, value2, "fromTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeIsNull() {
            addCriterion("endTime is null");
            return (Criteria) this;
        }

        public Criteria andEndTimeIsNotNull() {
            addCriterion("endTime is not null");
            return (Criteria) this;
        }

        public Criteria andEndTimeEqualTo(String value) {
            addCriterion("endTime =", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotEqualTo(String value) {
            addCriterion("endTime <>", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeGreaterThan(String value) {
            addCriterion("endTime >", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeGreaterThanOrEqualTo(String value) {
            addCriterion("endTime >=", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeLessThan(String value) {
            addCriterion("endTime <", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeLessThanOrEqualTo(String value) {
            addCriterion("endTime <=", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeLike(String value) {
            addCriterion("endTime like", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotLike(String value) {
            addCriterion("endTime not like", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeIn(List<String> values) {
            addCriterion("endTime in", values, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotIn(List<String> values) {
            addCriterion("endTime not in", values, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeBetween(String value1, String value2) {
            addCriterion("endTime between", value1, value2, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotBetween(String value1, String value2) {
            addCriterion("endTime not between", value1, value2, "endTime");
            return (Criteria) this;
        }

        public Criteria andRatioIsNull() {
            addCriterion("ratio is null");
            return (Criteria) this;
        }

        public Criteria andRatioIsNotNull() {
            addCriterion("ratio is not null");
            return (Criteria) this;
        }

        public Criteria andRatioEqualTo(Integer value) {
            addCriterion("ratio =", value, "ratio");
            return (Criteria) this;
        }

        public Criteria andRatioNotEqualTo(Integer value) {
            addCriterion("ratio <>", value, "ratio");
            return (Criteria) this;
        }

        public Criteria andRatioGreaterThan(Integer value) {
            addCriterion("ratio >", value, "ratio");
            return (Criteria) this;
        }

        public Criteria andRatioGreaterThanOrEqualTo(Integer value) {
            addCriterion("ratio >=", value, "ratio");
            return (Criteria) this;
        }

        public Criteria andRatioLessThan(Integer value) {
            addCriterion("ratio <", value, "ratio");
            return (Criteria) this;
        }

        public Criteria andRatioLessThanOrEqualTo(Integer value) {
            addCriterion("ratio <=", value, "ratio");
            return (Criteria) this;
        }

        public Criteria andRatioIn(List<Integer> values) {
            addCriterion("ratio in", values, "ratio");
            return (Criteria) this;
        }

        public Criteria andRatioNotIn(List<Integer> values) {
            addCriterion("ratio not in", values, "ratio");
            return (Criteria) this;
        }

        public Criteria andRatioBetween(Integer value1, Integer value2) {
            addCriterion("ratio between", value1, value2, "ratio");
            return (Criteria) this;
        }

        public Criteria andRatioNotBetween(Integer value1, Integer value2) {
            addCriterion("ratio not between", value1, value2, "ratio");
            return (Criteria) this;
        }

        public Criteria andDaysIntervalIsNull() {
            addCriterion("daysInterval is null");
            return (Criteria) this;
        }

        public Criteria andDaysIntervalIsNotNull() {
            addCriterion("daysInterval is not null");
            return (Criteria) this;
        }

        public Criteria andDaysIntervalEqualTo(Integer value) {
            addCriterion("daysInterval =", value, "daysInterval");
            return (Criteria) this;
        }

        public Criteria andDaysIntervalNotEqualTo(Integer value) {
            addCriterion("daysInterval <>", value, "daysInterval");
            return (Criteria) this;
        }

        public Criteria andDaysIntervalGreaterThan(Integer value) {
            addCriterion("daysInterval >", value, "daysInterval");
            return (Criteria) this;
        }

        public Criteria andDaysIntervalGreaterThanOrEqualTo(Integer value) {
            addCriterion("daysInterval >=", value, "daysInterval");
            return (Criteria) this;
        }

        public Criteria andDaysIntervalLessThan(Integer value) {
            addCriterion("daysInterval <", value, "daysInterval");
            return (Criteria) this;
        }

        public Criteria andDaysIntervalLessThanOrEqualTo(Integer value) {
            addCriterion("daysInterval <=", value, "daysInterval");
            return (Criteria) this;
        }

        public Criteria andDaysIntervalIn(List<Integer> values) {
            addCriterion("daysInterval in", values, "daysInterval");
            return (Criteria) this;
        }

        public Criteria andDaysIntervalNotIn(List<Integer> values) {
            addCriterion("daysInterval not in", values, "daysInterval");
            return (Criteria) this;
        }

        public Criteria andDaysIntervalBetween(Integer value1, Integer value2) {
            addCriterion("daysInterval between", value1, value2, "daysInterval");
            return (Criteria) this;
        }

        public Criteria andDaysIntervalNotBetween(Integer value1, Integer value2) {
            addCriterion("daysInterval not between", value1, value2, "daysInterval");
            return (Criteria) this;
        }

        public Criteria andDriveCountIsNull() {
            addCriterion("driveCount is null");
            return (Criteria) this;
        }

        public Criteria andDriveCountIsNotNull() {
            addCriterion("driveCount is not null");
            return (Criteria) this;
        }

        public Criteria andDriveCountEqualTo(Integer value) {
            addCriterion("driveCount =", value, "driveCount");
            return (Criteria) this;
        }

        public Criteria andDriveCountNotEqualTo(Integer value) {
            addCriterion("driveCount <>", value, "driveCount");
            return (Criteria) this;
        }

        public Criteria andDriveCountGreaterThan(Integer value) {
            addCriterion("driveCount >", value, "driveCount");
            return (Criteria) this;
        }

        public Criteria andDriveCountGreaterThanOrEqualTo(Integer value) {
            addCriterion("driveCount >=", value, "driveCount");
            return (Criteria) this;
        }

        public Criteria andDriveCountLessThan(Integer value) {
            addCriterion("driveCount <", value, "driveCount");
            return (Criteria) this;
        }

        public Criteria andDriveCountLessThanOrEqualTo(Integer value) {
            addCriterion("driveCount <=", value, "driveCount");
            return (Criteria) this;
        }

        public Criteria andDriveCountIn(List<Integer> values) {
            addCriterion("driveCount in", values, "driveCount");
            return (Criteria) this;
        }

        public Criteria andDriveCountNotIn(List<Integer> values) {
            addCriterion("driveCount not in", values, "driveCount");
            return (Criteria) this;
        }

        public Criteria andDriveCountBetween(Integer value1, Integer value2) {
            addCriterion("driveCount between", value1, value2, "driveCount");
            return (Criteria) this;
        }

        public Criteria andDriveCountNotBetween(Integer value1, Integer value2) {
            addCriterion("driveCount not between", value1, value2, "driveCount");
            return (Criteria) this;
        }

        public Criteria andLastDriveTimeIsNull() {
            addCriterion("lastDriveTime is null");
            return (Criteria) this;
        }

        public Criteria andLastDriveTimeIsNotNull() {
            addCriterion("lastDriveTime is not null");
            return (Criteria) this;
        }

        public Criteria andLastDriveTimeEqualTo(Date value) {
            addCriterion("lastDriveTime =", value, "lastDriveTime");
            return (Criteria) this;
        }

        public Criteria andLastDriveTimeNotEqualTo(Date value) {
            addCriterion("lastDriveTime <>", value, "lastDriveTime");
            return (Criteria) this;
        }

        public Criteria andLastDriveTimeGreaterThan(Date value) {
            addCriterion("lastDriveTime >", value, "lastDriveTime");
            return (Criteria) this;
        }

        public Criteria andLastDriveTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("lastDriveTime >=", value, "lastDriveTime");
            return (Criteria) this;
        }

        public Criteria andLastDriveTimeLessThan(Date value) {
            addCriterion("lastDriveTime <", value, "lastDriveTime");
            return (Criteria) this;
        }

        public Criteria andLastDriveTimeLessThanOrEqualTo(Date value) {
            addCriterion("lastDriveTime <=", value, "lastDriveTime");
            return (Criteria) this;
        }

        public Criteria andLastDriveTimeIn(List<Date> values) {
            addCriterion("lastDriveTime in", values, "lastDriveTime");
            return (Criteria) this;
        }

        public Criteria andLastDriveTimeNotIn(List<Date> values) {
            addCriterion("lastDriveTime not in", values, "lastDriveTime");
            return (Criteria) this;
        }

        public Criteria andLastDriveTimeBetween(Date value1, Date value2) {
            addCriterion("lastDriveTime between", value1, value2, "lastDriveTime");
            return (Criteria) this;
        }

        public Criteria andLastDriveTimeNotBetween(Date value1, Date value2) {
            addCriterion("lastDriveTime not between", value1, value2, "lastDriveTime");
            return (Criteria) this;
        }

        public Criteria andFromTimeLikeInsensitive(String value) {
            addCriterion("upper(fromTime) like", value.toUpperCase(), "fromTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeLikeInsensitive(String value) {
            addCriterion("upper(endTime) like", value.toUpperCase(), "endTime");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {
        /**
         */
        private ScheduleTaskExample example;

        /**
         */
        protected Criteria(ScheduleTaskExample example) {
            super();
            this.example = example;
        }

        /**
         */
        public ScheduleTaskExample example() {
            return this.example;
        }

        /**
         */
        public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
            if (ifAdd) {
                add.add(this);
            }
            return this;
        }

        public interface ICriteriaAdd {
            /**
             */
            Criteria add(Criteria add);
        }
    }

    /**
     */
    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}